<template>
    <div class="memberitem">
        <div class="left">
            <div class="photoshow"> 
                <!-- <slot name="head_img"> </slot>    -->
                <img src="@/assets/images/base-images/解决-女头.png" alt="" @load="refresh" v-if="sex===0"> 
                <img src="@/assets/images/base-images/解决-男头.png" alt="" @load="refresh"  v-else-if="sex===1">
                </div>
        </div>
        <div class="center">
            <div class="name"><span><slot name="name"></slot></span>
            <span>
                <img src="@/assets/images/base-images/女.png" alt="" @load="refresh" v-if="sex===0">
                <img src="@/assets/images/base-images/男.png" alt="" @load="refresh" v-else-if="sex===1">
            </span></div>
            <div class="phone"><span><slot name="age"></slot> </span> <span> <slot name="phone"></slot></span></div>
            <div class="doc"><span><img src="@/assets/images/base-images/解决-档案.png" alt="" @load="refresh"></span><span>康复档案</span></div>
        </div>
        <div class="right" @click="gotoAssessment">
            + 评估
        </div>
    </div>
</template>

<script>
    export default {
        props: {
            sex: {
                type: Number,
                default:0 
            },
        },
        methods: {
            refresh() {
                this.$emit('refresh');
                console.log("发出刷新新号");
            },
            gotoAssessment(){
                this.$router.push('/assessment')
            }
        },
    }
</script>

<style  scoped>
    .memberitem{
        width: 355px;
        height: 88px;
        margin-left: 20px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid #bcbfc8;
    }
    .photoshow{
        width: 60px;
        height: 60px;
        border-radius: 50%;
        margin-right: 14px;
    }
    .photoshow img{
        width: 60px;
        height: 60px;
    }
    .center{
        width: 126px;
        margin-right: 50px;
    }
    .name{
        font-size: 16px;
        color: #121639;
        font-weight: 700;
        margin-bottom: 4px;
    }
    .name img{
        margin-left: 7px;
        width: 15px;
        height: 17px;
    }
    .phone{
        margin-bottom: 4px;
        color: #c6cad6;
        font-size: 14px;
        
    }
    .doc{
        line-height: 20px;
        text-align: center;
        font-size: 11px;
        color: #fff;
        height: 20px;
        width: 80px;
        border-radius: 10px;
        background: linear-gradient(to right, #1fcbcf 0%,#0484c3 100%);
    }
    .doc img{
        width: 9px;
        height: 11px;
        vertical-align: middle;
        margin-bottom: 2px;
        margin-right: 8px;
    }


    .right{
        width: 70px;
        height: 26px;
        border-radius: 13px;
        color: #121639;
        border: 1px solid #121639;
        text-align: center;
        line-height: 26px;
    }
</style>